﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using System.Xml;
using MCMLXVII.BackEnd.Services.Common.Messages;

#endregion

namespace MCMLXVII.BackEnd.Services.OrganizationChart.Messages
{
    
    [Serializable()]
    [System.Xml.Serialization.XmlType(Namespace = "http://tempuri.org/")]
    public class msgOrganizationTreeMembersClass
    {
        private int _OrganizationMemberClassID;
        public int OrganizationMemberClassID
        {
            get
            {
                return _OrganizationMemberClassID;
            }
            set
            {
                _OrganizationMemberClassID=value;
            }

        }

        private string _Description;
        public string Description
        {
            get
            {
                return _Description;
            }
            set
            {
                _Description=value;
            }

        }

        private bool _IdentifiesFinalUser;
        public bool IdentifiesFinalUser
        {
            get
            {
                return _IdentifiesFinalUser;
            }
            set
            {
                _IdentifiesFinalUser=value;
            }

        }

        private bool _IsGroup;
        public bool IsGroup
        {
            get
            {
                return _IsGroup;
            }
            set
            {
                _IsGroup=value;
            }

        }

        private bool _IsSecuritySelectable;
        public bool IsSecuritySelectable
        {
            get
            {
                return _IsSecuritySelectable;
            }
            set
            {
                _IsSecuritySelectable=value;
            }

        }

        private bool _IsWorkSelectable;
        public bool IsWorkSelectable
        {
            get
            {
                return _IsWorkSelectable;
            }
            set
            {
                _IsWorkSelectable=value;
            }

        }

        private bool _IsOrganizationTreeMember;
        public bool IsOrganizationTreeMember
        {
            get
            {
                return _IsOrganizationTreeMember;
            }
            set
            {
                _IsOrganizationTreeMember=value;
            }

        }

        private bool _IsRole;
        public bool IsRole
        {
            get
            {
                return _IsRole;
            }
            set
            {
                _IsRole=value;
            }

        }


        private string _AssemblyAndClass;
        public string AssemblyAndClass
        {
            get
            {
                return _AssemblyAndClass;
            }
            set
            {
                _AssemblyAndClass=value;
            }

        }

        private msgXMLResponse _BasicProperties;
        public msgXMLResponse BasicProperties
        {
            get
            {
                return _BasicProperties;
            }
            set
            {
                _BasicProperties=value;
            }

        }

        private System.Collections.Generic.List<int> _Members;
        public System.Collections.Generic.List<int> Members
        {
            get
            {
                return _Members;
            }
            set
            {
                _Members=value;
            }

        }

        public void AddMember(int MemberID)
        {
            _Members.Add(MemberID);
        }

        public bool IsMember(int MemberId)
        {
            return _Members.Contains(MemberId);
        }

        public msgOrganizationTreeMembersClass()
        {
            _Members = new List<int>();
        }


        public msgOrganizationTreeMembersClass(int OrganizationMemberClassID, string Description, bool IdentifiesFinalUser, bool IsGroup, bool IsSecuritySelectable, bool IsWorkSelectable, bool IsOrganizationTreeMember, bool IsRole, string AssemblyAndClass, string  BasicProperties)
        {
            _AssemblyAndClass = AssemblyAndClass;
            _Description = Description;
            _IdentifiesFinalUser = IdentifiesFinalUser;
            _IsGroup = IsGroup;
            _IsOrganizationTreeMember = IsOrganizationTreeMember;
            _IsSecuritySelectable = IsSecuritySelectable;
            _IsWorkSelectable = IsWorkSelectable;
            _IsRole = IsRole;
            _OrganizationMemberClassID = OrganizationMemberClassID;
            _BasicProperties = new msgXMLResponse(BasicProperties);
            _Members = new List<int>();

        }

    }
}
